package main

import (
	"fmt"
	"reflect"
)
/**
	反射
 */
func reflectType(x interface{})  {

	v := reflect.TypeOf(x)
	v1 := reflect.ValueOf(x)

	fmt.Printf("value: %v\n", v1)
	fmt.Printf("type: %v\n", v)
	fmt.Printf("type: %v kind:%v\n", v.Name(), v.Kind())
}

func main() {
	var a float32 = 3.14
	reflectType(a)

	var b int64 = 100
	reflectType(b)
}
